package com.handsome.工厂模式.工厂方法模式.order;




import com.handsome.工厂模式.工厂方法模式.pizza.BJCheesePizza;
import com.handsome.工厂模式.工厂方法模式.pizza.BJGreekPizza;
import com.handsome.工厂模式.工厂方法模式.pizza.Pizza;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author niechun
 * @date 2023/1/9 19:32
 */
public class OrderBJ extends OrderPizza{

    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza=null;
        if ("greek".equals(orderType)) {
            pizza = new BJGreekPizza("北京希腊披萨");
        } else if ("cheese".equals(orderType)) {
            pizza = new BJCheesePizza("北京奶酪披萨");
        }

        return pizza;
    }
}
